package com.lisp.clp.child_first;

import java.net.URL;

import org.apache.commons.logging.LogFactory;

public class ChildFirstTestJCL0 {
	public static void main(String[] args) throws Exception {
		ChildFirstClassLoader childClassLoader = new ChildFirstClassLoader(
	        new URL[] {
	          new URL("file:lib/commons-logging-1.0.4.jar")
        });
		
		Thread.currentThread().setContextClassLoader(childClassLoader);

	    // JCL will throw an exception as soon as LogFactory is called after the 
	    // TCCL is set to a child class loader, and both the parent and child
	    // have direct access to commons-logging.jar
	    LogFactory.getLog("logger.name.not.important.here");
	}
}
